﻿@{
    ViewBag.Title = "工资公式";
}
@section header{

}
<form id="form1">
    <div class="form-layout">
        <input type="hidden" name="ID" value="" />
        <table class="form">
            <tr>
                <th class="formTitle">名称</th>
                <td class="formValue">
                    <input id="Name" name="Name" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">计算类型</th>
                <td class="formValue">
                    <select id="SalaryType" name="SalaryType" class="form-control">
                        <option value="1">公式调用</option>
                        <option value="2">直接输入</option>
                        <option value="3">固定工资</option>
                        <option value="4">其它导入</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle">公式</th>
                <td class="formValue">
                    <input id="OperateExpression" name="OperateExpression" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">备注</th>
                <td class="formValue">
                    <input id="Remark" name="Remark" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>
        </table>
    </div>
</form>
@section scripts{
    <script>
        var baseUrl = "/reward/SalaryColumn/";
        var keyValue = $.request("keyValue");
        $(function () {
            initControl();
            $.ajax({
                url: baseUrl + "GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                    $("#form1").find('.form-control,select,input').attr('readonly', 'readonly');
                    $("#form1").find('div.ckbox label').attr('for', '');
                }
            });
        });
        function initControl() {

        }
    </script>
}